#pragma once

#include "../core/protocol_handler.hpp"
#include "../service/user_service.hpp"

#include <string>

namespace protocols {

class LoginProtocol : public IProtocolHandler, public std::enable_shared_from_this<LoginProtocol> {
public:
    explicit LoginProtocol();
    ~LoginProtocol() override;
        
    bool validate(GameServer& game_server, const nlohmann::json& message, uint32_t session_id) override;
    void process(GameServer& game_server, const nlohmann::json& message, uint32_t session_id) override;
    
private:
    std::shared_ptr<service::UserService> user_service_;
};

} // namespace protocols